package clids.ex2.orders;

import java.io.File;
import java.util.Comparator;


public class OrderSizeComparator implements Comparator<String> {
	// implementation of size comparator;
		public int compare(String o1, String o2) {
			File f1 = new File(o1);
			File f2 = new File(o2);
			long size1 = f1.length();
			long size2 = f2.length();

		if (size1 == size2) {
			return (o1.compareTo(o2));
			
			}
			return ((size1<size2)? -1:1);

		}
	}


